updating oE translate

translate

include locale.e 
namespace locale 
public function translate(sequence word, object langmap = 0, object defval = "", 
        integer mode = 0) 

translates a word, using the current language file.

Parameters:
  1. word : a sequence, the word to translate.
  2. langmap : Either a value returned by lang_load or zero to use the default language map
  3. defval : a object. The value to return if the word cannot be translated. Default is "". If defval is PINF then the word is returned if it can not be translated.
  4. mode : an integer. If zero (the default) it uses word as the keyword and returns the translation text. If not zero it uses word as the translation and returns the keyword.
Returns:

A sequence, the value associated with word, or defval if there is no association.

Example 1:
sequence newword 
newword = translate(msgtext) 
if length(msgtext) = 0 then 
   error_message(msgtext) 
else 
   error_message(newword) 
end if 
Example 2:
error_message(translate(msgtext, , PINF)) 
See Also:

set, lang_load

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu